﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Sino.CapacityCloud.Infrastructure.Services
{

    public interface IBackgroundWorker
    {

        bool IsRunning { get; }

        /// <summary>
        /// Start the background worker digest loop.
        /// </summary>
        void Start();

        /// <summary>
        /// Stop the background worker digest loop.
        /// </summary>
        /// <param name="timeout"></param>
        void Stop(int timeout = 2000);

    }

}